package cn.cyh.product.domain;

import cn.cyh.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
@Data
public class Product extends BaseDomain{
    private String name;
    //资源路径  多个逗号分隔
    private String resources;
    private BigDecimal saleprice;//精确到分
    private BigDecimal costprice;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date offsaletime;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date onsaletime;
    private Integer state = 0;//状态：0下架 1上架
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createtime = new Date();
    //销售数量
    private Long salecount;

    //接收前台传过来的详情参数==新增和修改
    private ProductDetail detail = new ProductDetail();

}
